<template>
    <div>
        <van-nav-bar title="标题" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-search v-model="value" shape="round" placeholder="请输入搜索关键词" />
        <van-cell-group v-for="item in qsearch">
            <van-cell :title="单元格" />
        </van-cell-group>
    </div>
</template>

<script setup>
import { ref, watch } from 'vue';
import { qsearchApi } from '@/api/api'
let qsearch = ref('[]')
let value=ref('')
watch(value, (oi) => {
    console.log('监听的数据',oi);
    qsearchApi(oi).then(res => {
        console.log('搜索', res);
        qsearch.value = res.data.message
    })
})

</script>

<style lang="scss" scoped></style>